import 'package:flutter/material.dart';
import 'package:shopping_group/base/base_constant.dart';
import 'package:shopping_group/res/colors.dart';
import 'package:shopping_group/res/dimens.dart';
import 'package:shopping_group/utils/widget_utils.dart';

class UserYsAboutPage extends StatefulWidget {
  UserYsAboutPage({
    Key key,
  }) : super(key: key);

  @override
  _UserYsAboutPageState createState() => _UserYsAboutPageState();
}

class _UserYsAboutPageState extends State<UserYsAboutPage> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: WidgetUtils.showAppar(context, '生活隐私协议'),
      body: GestureDetector(
        behavior: HitTestBehavior.translucent,
        onTap: () {
          // 触摸收起键盘
          FocusScope.of(context).requestFocus(FocusNode());
        },
        child: Container(
          alignment: Alignment.center,
          decoration: new BoxDecoration(
            color: Colours.title_white,
          ),
          // margin: EdgeInsets.symmetric(horizontal: 16),
          child: _contentView(),
        ),
      ),
    );
  }

  Widget _contentView() {
    return Container(
      alignment: Alignment.centerLeft,
      margin: EdgeInsets.symmetric(horizontal: Dimens.FONT_SIZE_8),
      padding: EdgeInsets.symmetric(vertical: Dimens.FONT_SIZE_12, horizontal: Dimens.FONT_SIZE_16),
      decoration: BoxDecoration(
          border: Border.all(color: Colours.title_white, width: 0.0),
          borderRadius: BorderRadius.circular(10.0),
          color: Colours.title_white),
      child: SingleChildScrollView(
        scrollDirection: Axis.vertical,
        reverse: false,
        padding: EdgeInsets.all(0.0),
        physics: BouncingScrollPhysics(),
        child: WidgetUtils.getTextColorView(
          BaseConstant.CONTEN_YS,
          Colours.text_2222,
          Dimens.FONT_SIZE_16,
          // textAlign: TextAlign.center,
        ),
      ),
    );
  }

  @override
  void dispose() {
    super.dispose();
  }
}
